﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tool.Helper;

namespace Tool.Configs
{
    public class DmConfigEntity
    {
        /// <summary>
        /// 插件免注册  路径
        /// </summary>
        public const string DmRegDllPath = @"./lib/DmReg.dll";

        private static DmInfo info;
        public static DmInfo Info
        {
            get
            {
                if (info == null)
                {
                    info = JsonHelper.ReadData<DmInfo>("Configs/DmConfig.json");
                }
                return info;
            }
        }

    }
    public class DmInfo
    {
        /// <summary>
        /// 插件 dll 路径
        /// </summary>
        public string DmClassDllPath { get; set; } = "./lib/dm3.1233.dll";
        /// <summary>
        /// 插件注册码
        /// </summary>
        public string DmRegCode { get; set; } = "657891f65d1d21c6c69c5c39555009879580bb";
        /// <summary>
        /// 插件版本
        /// </summary>
        public string DmVerInfo { get; set; } = "";
        /// <summary>
        /// 所有接口调用中,相关的文件都相对于此路径. 比如图片,字库等
        /// </summary>
        public string DmGlobalPath { get; set; } = "./Resources";
    }
}
